﻿@using OBUCare.Web.Models;
@using OBUCare.Core.Models;
@using OBUCare.Web.Infrastructure;
@model IEnumerable<ExtendedSelectListItem<DICT_TYPE_VALUE>>
@* @Html.CheckBoxList("orderFault",
                        m => m.AvailableValues, 
                        m => m.ID, 
                        m => m.DICT_TITLE,
                        (CheckBoxListValueViewModel<DICT_TYPE_VALUE> m)=>m.SelectedValues
                     )*@
 <table>
 <tr>
 <td>

@if (Model != null)
{

    int a = 0;
    for (int i = 0; i < Model.Count(); i++)
    {
        string chkid=UIConstants.orderFault+Model.ElementAt(i).Value;
      
            @Html.CheckBox(chkid, Model.ElementAt(i).Selected, new {@id=chkid})
            @Html.Label(chkid, Model.ElementAt(i).Text, new { name = "lab" }) 
           @:&nbsp;&nbsp;&nbsp;
     
        a = i+1;
        if (a == 4)
        {
            a=0;
            @:</br>
        }
    }
@*        foreach(var item in Model)
        {
            string chkid=UIConstants.orderFault+item.Value;
            @Html.CheckBox(chkid, item.Selected, new {@id=chkid})
            @Html.Label(chkid, item.Text, new { name = "lab" })
            
        }*@
    @Html.TextBox(UIConstants.orderFaultReMark)

}
  
 </td>
 </tr>
 
 </table>